#!/bin/bash
##服务安装总菜单
bash ./k8s_install/chek/network.sh 
if [[ $UID == "0" ]];then
	sudo bash k8s_install/config/sysconfig.sh
	echo 'config sources [y/n];Default[y]'
	read gh
	if [[ "$gh" == "n" || "$gh" == "N" ]];then
		echo '跳过'
	else
		sudo bash k8s_install/config/sources.sh
	fi
else
	echo 'please use ROOT users'
	exit 1000
fi
if [[ "$1" == "1" ]];then
	sudo bash k8s_install/install/docker.sh "$2"
	sudo bash k8s_install/install/k8s.sh	"$2"
elif [[ "$1" == "2" ]];then
	sudo bash k8s_install/install/docker.sh "$2"
elif [[ "$1" == "3" ]];then
	sudo bash k8s_install/install/k8s.sh "$2"
else
	echo 'select errors'
	sudo bash k8s_install/Y 
fi
